-- GENERATED SPELL FOR [Oric the Baleful] --


function spell0_24161(pUnit, Event) --@Cleave,n/a--
pUnit:FullCastSpellOnTarget(15496,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24161', 644, 1)
end

function spell1_24161(pUnit, Event) --@Mortal Strike,n/a--
pUnit:FullCastSpellOnTarget(32736,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24161', 5279, 1)
end

function Sorts_24161(pUnit, Event)
local choix_sorts_24161 = math.random(0, 1)
if choix_sorts_24161 == 0 then
pUnit:RegisterEvent('spell0_24161', 1, 1)
end
if choix_sorts_24161 == 1 then
pUnit:RegisterEvent('spell1_24161', 1, 1)
end
end

function mob24161_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_24161', math.random(1500, 3000), 1)
end

function mob24161_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob24161_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob24161_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(24161, 1, 'mob24161_Action')
RegisterUnitEvent(24161, 2, 'mob24161_Leave')
RegisterUnitEvent(24161, 3, 'mob24161_Kill')
RegisterUnitEvent(24161, 4, 'mob24161_Die')
